// 网络请求：fetch、XMLHttpRequest。统称术语（AJAX）

{
  async function getUsers(names) {
    let baseUrl = 'https://api.github.com/users/'
    let fetchPromise = names.map((name) => fetch(baseUrl + name))

    let res = []
    let results =  await Promise.allSettled(fetchPromise)
    for (const result of results) {
       if (result.value.status === 200) {
        let value = await result.value.json()
        res.push(value)
       } else {
        res.push(null)
      }
    }
    console.log(res);
  }

   getUsers(['iliakan', 'remy', 'no.such.users'])
}